import { Component, Vue, Prop } from 'vue-property-decorator'
import style from './UnAuthorized.less'

@Component({})
export default class UnAuthorized extends Vue {
  @Prop({ default: '您尚未获得任何印章管理授权' }) private content!: string
  @Prop({ default: '' }) private url!: string
  protected render() {
    return (
      <div class={{ [style.unAuthorized]: true }}>
        <div class={{ [style.content]: true }}>
          <img src={this.url || require('@/assets/data-empty.svg')} alt="" />
          <p class={{ [style.msg]: true }}>
            <p>{this.content}</p>
            <el-button type="primary" size="mini" on-click={this.apply}>
              申请成为印章管理员
            </el-button>
          </p>
        </div>
      </div>
    )
  }

  private apply(): void {
    this.$router.push('/home/administratorApply/agencyAdministratorApply')
  }
}
